package org.example.javalog.Facade;


import org.example.javalog.Model.DiningLight;
import org.example.javalog.Model.HallLight;
import org.example.javalog.Model.LivingRoomLight;

/**
 * 灯的门面
 */

public class LightFacade {
    //开灯要打开所有的灯
    private DiningLight diningLight = new DiningLight();
    private LivingRoomLight livingRoomLight = new LivingRoomLight();
    private HallLight hallLight = new HallLight();

    //打开所有的灯
    public void LightOn(){
        diningLight.on();
        livingRoomLight.on();
        hallLight.on();
    }

    //关闭所有的灯
    public void LightOff(){
        diningLight.off();
        livingRoomLight.off();
        hallLight.off();
    }
}
